package demo2;

public class Demo2 {
    public static void main(String[] args) {
        long maxMemory = Runtime.getRuntime().maxMemory();
        long totalMemory = Runtime.getRuntime().totalMemory();

        System.out.println("maxMemory:"+(maxMemory/1024/1024)+"MB");
        System.out.println("totalMemory:"+(totalMemory/1024/1024)+"MB");
        //原始：3611MB 243MB

        //VM Options:-Xms1024m -Xmx1024m -XX:+PrintGCDetails
        //修改：981MB 981MB
    }
}
